[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
_toupper() Convert 'c' to Uppercase (Macro)
#include <ctype.h>
int _toupper(c);
int c; Character to be converted
_toupper() converts 'c' to uppercase. _toupper() is a macro. It
should be used only is you know that 'c' is lowercase, as result is
undefined otherwise.
Returns: The converted character 'c'. There is no error
return.
Notes: Use toupper() to convert characters that are not
necessarily lowercase letters.
-------------------------------- Example ---------------------------------
The following statements convert 'string' to uppercase if needed.
#include <ctype.h>
#include <stdio.h>
char string[15] = "alphabet";
int x;
main()
{
for (x = 0; x < strlen(string); x++)
printf("%c",_toupper(string[x]));
printf("\n");
}
See Also:
toupper()
isupper()
islower()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson